home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / pfs.h,v < prev    next >
Encoding:
Text File  |  1989-06-23  |  3.7 KB  |  169 lines

  1. head     1.4;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.4
  10. date     89.06.23.11.27.48;  author rab;  state Exp;
  11. branches ;
  12. next     1.3;
  13.  
  14. 1.3
  15. date     89.06.08.15.35.58;  author brent;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     89.01.27.09.28.01;  author brent;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     89.01.20.15.25.57;  author brent;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @Pseudo-file-system library package definitions
  32. @
  33.  
  34.  
  35. 1.4
  36. log
  37. @*** empty log message ***
  38. @
  39. text
  40. @/*
  41.  * pfs.h --
  42.  *
  43.  * Definitions for pseudo-file-system library routines.  The man page
  44.  * for Pfs has necessary documentation.
  45.  *
  46.  * Copyright 1985, 1988 Regents of the University of California
  47.  * Permission to use, copy, modify, and distribute this
  48.  * software and its documentation for any purpose and without
  49.  * fee is hereby granted, provided that the above copyright
  50.  * notice appear in all copies.  The University of California
  51.  * makes no representations about the suitability of this
  52.  * software for any purpose.  It is provided "as is" without
  53.  * express or implied warranty.
  54.  *
  55.  * $Header: /sprite/src/lib/include/RCS/pfs.h,v 1.3 89/06/08 15:35:58 brent Exp Locker: rab $ SPRITE (Berkeley)
  56.  */
  57.  
  58. #ifndef _PFSLIB
  59. #define _PFSLIB
  60.  
  61. #include <fs.h>
  62. #include <pdev.h>
  63. #include <dev/pfs.h>
  64.  
  65. /*
  66.  * Boolean that can be toggled by applications command line arguments.
  67.  * This causes print statements that trace pfs operations.
  68.  */
  69. extern int pfs_Trace;
  70.  
  71. /*
  72.  * The library keeps a set of callback procedures, one for each pfs request
  73.  * that arrives on the naming request stream.  Fields can be set to NULL to get
  74.  * a default (no-op) handler for the operation.  See the man page for the
  75.  * calling sequence of each call-back procedure.
  76.  */
  77.  
  78. typedef struct {
  79.     int (*open)();        /* PFS_OPEN */
  80.     int (*getAttr)();        /* PFS_GET_ATTR */
  81.     int (*setAttr)();        /* PFS_SET_ATTR */
  82.     int (*makeDevice)();    /* PFS_MAKE_DEVICE */
  83.     int (*makeDir)();        /* PFS_MAKE_DIR */
  84.     int (*remove)();        /* PFS_REMOVE */
  85.     int (*removeDir)();        /* PFS_REMOVE_DIR */
  86.     int (*rename)();        /* PFS_RENAME */
  87.     int (*hardLink)();        /* PFS_HARD_LINK */
  88.     int (*symLink)();        /* PFS_SYM_LINK */
  89.     int (*domainInfo)();    /* PFS_DOMAIN_INFO */
  90. } Pfs_CallBacks;
  91.  
  92. /*
  93.  * A Pfs_Token is returned from the Pfs_Open call.  It is passed
  94.  * back to the Pfs_SetHandler and Pfs_Close calls.
  95.  */
  96.  
  97. typedef char *Pfs_Token;
  98.  
  99. #define PFS_MAGIC    0x4a3b2c1d
  100.  
  101. extern char pfs_ErrorMsg[];
  102.  
  103. extern    Pfs_Token            Pfs_Open();
  104. extern    int               (*Pfs_SetHandler())();
  105. extern    Pdev_Stream           *Pfs_OpenConnection();
  106. extern    int            Pfs_PassFile();
  107. extern    void            Pfs_Close();
  108. #endif /* _PFSLIB */
  109. @
  110.  
  111.  
  112. 1.3
  113. log
  114. @Added domainInfo to call-back set.
  115. @
  116. text
  117. @d16 1
  118. a16 1
  119.  * $Header: /sprite/src/lib/include/RCS/pfs.h,v 1.2 89/01/27 09:28:01 brent Exp $ SPRITE (Berkeley)
  120. d69 1
  121. a69 1
  122. #endif _PFSLIB
  123. @
  124.  
  125.  
  126. 1.2
  127. log
  128. @Cleaned up interface
  129. @
  130. text
  131. @d16 1
  132. a16 1
  133.  * $Header: /sprite/src/lib/include/RCS/pdev.h,v 1.4 88/10/30 14:01:03 brent Exp Locker: brent $ SPRITE (Berkeley)
  134. d50 1
  135. @
  136.  
  137.  
  138. 1.1
  139. log
  140. @Initial revision
  141. @
  142. text
  143. @d5 1
  144. a5 1
  145.  * for pfs (or Pfs_Open) has necessary documentation.
  146. d23 1
  147. d47 1
  148. d53 2
  149. a54 3
  150.  * A (pointer to a) Pfs_Token is returned from the Pfs_Open call.
  151.  * It contains a clientData field for use by the pseudo-file-system server.
  152.  * It gets passed into Pfs_Close to end pseudo-file-system service.
  153. a55 7
  154. typedef struct Pfs_Token {
  155.     unsigned int magic;        /* PFS_MAGIC */
  156.     int streamID;        /* Sprite stream identifier, either of
  157.                  * control or server stream depending
  158.                  * on context of the token. */
  159.     ClientData clientData;    /* For use by the client of the Pdev package */
  160. } Pfs_Token;
  161. d57 2
  162. d63 5
  163. a67 4
  164. extern    ClientData    Pfs_Open();
  165. extern    void        Pfs_SetHandler();
  166. extern    ReturnStatus    Pfs_OpenConnection();
  167. extern    void        Pfs_Close();
  168. @
  169.